home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d880.lha
/
Oberon
/
O3Demo2.lzh
/
Examples
/
Turtle.mod
< prev
next >
Wrap
Text File
|
1993-01-15
|
533b
|
30 lines
MODULE Turtle;
IMPORT D := Display, Dos;
VAR w: D.WindowPtr;
PROCEDURE Draw(s: REAL);
BEGIN
IF s>2 THEN
D.TurnLeft (w,36.9); Draw(s*0.8);
D.TurnRight(w,90 ); Draw(s*0.6);
D.TurnLeft (w,53.1);
ELSE
D.Forward(w,s);
END;
END Draw;
BEGIN
NEW(w);
IF D.OpenWindow(w,"Turtle-Grafik",0,0,512,256,NIL) THEN
D.SetTurtlePos(w,w.width/4,w.height/4*3);
D.SetTurtleDir(w,-90);
D.Jam1(w);
D.FrontPen(w,1);
D.SetPen(w);
Draw(w.width/3);
END;
Dos.Delay(200);
END Turtle.